package com.dm.server.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dm.server.entity.VoucherOrder;
import org.apache.ibatis.annotations.Select;
import java.time.LocalDateTime;
import java.util.List;




/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 虎哥
 * @since 2021-12-22
 */
public interface VoucherOrderMapper extends BaseMapper<VoucherOrder> {

    /**
     * 订单状态和下单时间查询订单
     * @param status
     * @param time
     * @return
     */
    @Select("select *from tb_voucher_order where status=#{status} and create_time<#{time}")
    List<VoucherOrder> getByStatusAndOrderTimeLT(Integer status,LocalDateTime time);

}
